import { get, post, put, del } from './axios'
const Api = {
  login: data => post('admin/login', data), //用户登录
  admin: data => get('admin/me', data), //用户信息
  permissions: (data,is_id) => get('admin/user/permissions',data,is_id),//获取用户权限
  captcha: data => get('admin/captcha', data), //验证码
  reset: data => get('admin/sms/reset/password', data), //忘记密码
  smsLogin: data => get('admin/sms/login',data),//登录短信验证码
  logout: data => post('admin/logout',data), //退出登录
  stores: data => get('admin/stores',data),//门店列表
  staffs: (data,is_id) => get('admin/permission/staffs',data,is_id),//门店管理员列表
  areaStores: data => get('admin/permission/area/stores',data), //权限所属的军区门店列表
  appendStores: data => post('admin/stores',data), //添加门店
  editStores: (data, is_id) => put('admin/stores', data, is_id), // 修改门店
  removeStores: (data,is_id) => del('admin/stores',data, is_id), // 删除门店
  areas: (data,is_id) => get('admin/areas',data,is_id), //军区列表
  areasAll: (data,is_id) => get('admin/all/area',data,is_id),//军区列表全部
  appendAreas: data => post('admin/area',data),//添加军区
  editAreas: (data,is_id) => put('admin/area',data,is_id), //修改军区
  removeAreas: (data,is_id) => del('admin/area',data, is_id),//删除军区
  station: data => get('admin/job-positions',data), //岗位列表
  stationAll: data => get('admin/all/job-position',data),//岗位列表所有
  appendStation: data => post('admin/job-position',data),//添加岗位
  editStation: (data,is_id) => put('admin/job-position',data,is_id),//更新岗位
  removeStation: (data,is_id) => del('admin/job-position',data,is_id), //删除岗位
  payment: data => get('admin/payment-methods',data), //支付列表
  allPayment: data => get('admin/all/payment-method',data),//支付类型列表
  appendPayment: data => post('admin/payment-method',data),//添加支付
  editPayment: (data,is_id) => put('admin/payment-method',data,is_id),//更新支付
  removePayment: (data,is_id) => del('admin/payment-method',data,is_id), //删除支付
  ossToken: data => get('admin/oss/sts-sign',data), //获取oss签名
  userList: data => get('admin/users',data), //账号管理
  removeUserList: (data,is_id) => del('admin/user',data,is_id), //删除账号
  userDetail: (data,is_id) => get('admin/user',data,is_id),//账号详情
  staffStatus: (data,is_id) => put('admin/staff-status',data,is_id) ,// 修改账号状态
  permission: (data,is_id) => get('admin/permission/stores',data,is_id),// 账号管理 门店列表
  appendUser: data => post('admin/user',data),//添加账号
  editUser: (data,is_id) => put('admin/user',data,is_id),//编辑账号
  rolesAll: data => get('admin/roles',data),//角色列表全部
  allStores: data => get('admin/area/all/stores',data),//添加账号可访问门店
  adminPermissions: data => get('admin/permissions',data), //获取可操作菜单
  rolesList: data => get('admin/paginate-roles',data),//觉得列表
  rolesDetail: (data,is_id) => get('admin/role',data,is_id),//角色详情
  appendRole: data => post('admin/role',data),//添加角色
  editRole: (data,is_id) => put('admin/role',data,is_id),
  roleChange: (data,is_id) => put('admin/role-status',data,is_id),//修改角色启用
  removeRole: (data,is_id) => del('admin/role',data,is_id),//删除角色


  customers: data => get('admin/customers',data),//会员列表
  customerDetail: (data,is_id) => get('admin/customer',data,is_id),//会员详情
  accountHistory: (data,is_id) => get('admin/customer-info/account-history',data,is_id),//会员详情账户信息
  accountCards: (data,is_id) => get('admin/customer-info/cards',data,is_id),//会员详情卡项信息
  accountPackage: (data,is_id) => get('admin/customer-info/package',data,is_id),//会员详情套餐信息
  accountItems: (data,is_id) => get('admin/customer-info/items',data,is_id),//会员详情品相信息
  accountOrder: (data,is_id) => get('admin/customer-info/order-record',data,is_id),//会员详情订单记录
  accountGood: (data,is_id) => get('admin/customer-info/purchase-record',data,is_id),//会员详情商品购买记录


  addCustomers: data => post('admin/customer',data),//添加会员
  editCustomers: (data,is_id) => put('admin/customer',data,is_id),//添加会员
  removeCustomers: (data,is_id) => del('admin/customer',data,is_id),//删除会员
  customerSms: (data,is_id) => get('admin/sms/enrollment/customer',data,is_id),//会员获取验证码

  cities: (data,is_id) =>get('admin/cities',data,is_id),//地区管理列表
  postCities: data => post('admin/cities',data),//地区管理添加
  putCities: (data,is_id) => put('admin/cities',data,is_id),//地区管理修改
  delCities: (data,is_id) =>del('admin/cities',data,is_id), //删除地区

  getSource: (data,is_id) => get('admin/channel-sources',data,is_id),//渠道列表
  removeSource: (data,is_id) => del('admin/channel-source',data,is_id),//渠道列表
  appendSource: data => post('admin/channel-source',data),//添加来源渠道
  editSource: (data,is_id) => put('admin/channel-source',data,is_id),//修改来源渠道

  cates: (data,is_id) => get('admin/goods/cates',data,is_id),//服务,品类 分类添加列表
  addCates: data => post('admin/goods/cate',data),//添加商品分类
  editCates: (data,is_id) => put('admin/goods/cate',data,is_id),//编辑商品分类
  removeCates: (data,is_id) => del('admin/goods/cate',data,is_id),//编辑商品分类


  getProject: (data,is_id) => get('admin/projects',data,is_id),//服务管理列表
  postProject: data => post('admin/project',data),//添加服务
  editProject: (data,is_id) => put('admin/project',data,is_id),//编辑服务
  newProject: (data,is_id) => put('admin/project-status',data,is_id),//服务上下架
  channelAll: (data,is_id) => get('admin/all/channel-source',data,is_id),//渠道管理全部

  itemsList: (data,is_id) => get('admin/items',data,is_id),//品相列表
  addItem: data => post('admin/item',data),//添加品相
  editItem: (data,is_id) => put('admin/item',data,is_id),//修改品相
  newItems: (data,is_id) => put('admin/item-status',data,is_id),//品相上下架

  goodsDetail: (data,is_id) => get('admin/good',data,is_id),//商品详情
  goods: (data,is_id) => get('admin/goods',data,is_id),//商品列表
  wig: data => post('admin/wig',data),//添加商品
  addGood: data => post('admin/good',data),//添加商品
  editwig: (data,is_id) => put('admin/wig',data,is_id),//添加商品
  editGood: (data,is_id) => post('admin/good',data,is_id),//添加商品
  goodStatus: (data,is_id) => put('admin/good-status',data,is_id),//产品上下架
  ruGood: (data,is_id) => put('admin/good-stock/add',data,is_id),//商品入库
  editStockNum: (data,is_id) => put('admin/good-stock/update',data,is_id),//修改库存


  packages: (data,is_id) => get('admin/packages',data,is_id),//套餐列表
  packDetail: (data,is_id) =>get('admin/package',data,is_id),//套餐详情
  goodList: (data,is_id) => get('admin/goods-services',data,is_id),//商品列表
  addPackages: data => post('admin/package',data),//添加套餐
  editPackages: (data,is_id) => put('admin/package',data,is_id),//修改套餐
  statusPackages: (data,is_id) => put('admin/package-status',data,is_id),//套餐上下架

  cards: (data,is_id) => get('admin/cards',data,is_id),//卡项列表
  cardsGood: (data,is_id) => get('admin/card-search-goods',data,is_id),//卡项添加商品
  addCard: data => post('admin/card',data),//添加卡项
  editCard: (data,is_id) => put('admin/card',data,is_id),//修改卡项
  editCardStatus: (data,is_id) => put('admin/card-status',data,is_id),//修改卡项状态
  cardsDetail: (data,is_id) => get('admin/card',data,is_id),//卡项详情

  reservations: (data,is_id) => get('admin/reservations',data,is_id),//预约中心列表


  orders: (data,is_id) => get('admin/orders',data,is_id),//订单列表
  ordersDetail: (data,is_id) => get('admin/order',data,is_id),//订单详情
  orderStatus: (data,is_id) => post('admin/check-order',data,is_id),//订单审核
  orderEdit: (data,is_id) => get('admin/order-refund-goods',data,is_id), //退款列表
  refundOrder: (data,is_id) => post('admin/order-refund',data,is_id), //订单退款

  turnover: (data,is_id) => get('admin/financial/transaction/turnover',data,is_id),//交易流水
  paymentMethods: (data,is_id) => get('admin/all/payment-method',data,is_id),//支付方式

  consumerDetails: (data,is_id) => get('admin/financial/consumer/details',data,is_id),//消费明细
};
export default Api
